import Vue from 'vue'
import App from './App.vue'
import router from './route/index.js'
import store from './store/store.js'
import fanghui from './components/fanhui.vue'
import {get,post} from './http/index.js'
import axios from 'axios'
// import API from './utils/API.js'
// 引入 flexible 用于设置 rem 基准值 
import 'lib-flexible'

// vant
import { Cell, CellGroup } from 'vant';
Vue.use(Cell);
Vue.use(CellGroup);
import { Button } from 'vant';
Vue.use(Button);
import { GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant';
Vue.use(GoodsAction);
Vue.use(GoodsActionButton);
Vue.use(GoodsActionIcon);
import { Sku } from 'vant';
Vue.use(Sku);

// 时间过滤器
import moment from 'moment'
 Vue.filter('formatDate',(date,formatStr)=>{
	 moment.locale('zh‐cn') //全局设置为中文显示
	 return moment(date).format(formatStr)
	 })
	 
	 
Vue.prototype.$get = get 
Vue.prototype.$post = post
// Vue.prototype.$axios = axios
// Vue.prototype.$get = axios.get
 Vue.component('fanhui',fanghui)
Vue.config.productionTip = false



// router.beforeEach((to, from, next) => {
  
//   if (to.meta.title) {
//     document.title = to.meta.title
//   }
//   next()
// })

new Vue({
  render: h => h(App),
  router:router,
  store,

}).$mount('#app')
